<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Array的扩展运算符</title>
</head>
<body>
    <script>
        let arr1 = [10,20,30,40];
        // console.log(...arr);//输出10,20,30,40
        //用于合并数组
        let arr2 = [22,33,44,55,666];
        //第一种方法
        let arr3 = [...arr1,...arr2];
        console.log(...arr3);
        //第二种方法
        arr1.push(arr2);
        console.log(...arr1);
    </script>
</body>
</html>